package com.bauer.base.jvm;

/**
 * @Author ：rui.wei
 * @Date ：Created in 10:56 2019/2/12
 * @Description：
 */
public class StringinternDemo {

    public static void main(String[] args) {
        String str1 = new StringBuilder("haosdf").append("asdfasd").toString();
        System.out.println(str1.intern() == str1);

        String str2 = new StringBuilder("ja").append("va1").toString();
        System.out.println(str2.intern() == str2);
    }

}
